There are some registred stock ids like gtk-discards that have no icons,
and you could also pass a non-registred stock id. Both of these means
gtk_style_context_lookup_icon_set returns NULL, which causes
a critical in gtk_icon_set_render_icon_pixbuf.
We avoid this by just making these render as EMPTY.
case GTK_IMAGE_STOCK:
icon_set = gtk_style_context_lookup_icon_set (context, self->priv->stock_id);
- ensure_pixbuf_for_icon_set (self, context, icon_set);
+ if (icon_set != NULL)
+ ensure_pixbuf_for_icon_set (self, context, icon_set);
+ else
+ pixbuf = NULL;
break;
case GTK_IMAGE_ICON_SET: